package com.mall.app.service.impl;

import com.mall.app.bean.TbBuyer;
import com.mall.app.dao.TbBuyerMapper;
import com.mall.app.service.TbBuyerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 买家表 服务实现类
 * </p>
 *
 * @author LeeSin
 * @since 2020-07-10
 */
@Service
@Transactional
public class TbBuyerServiceImpl extends ServiceImpl<TbBuyerMapper, TbBuyer> implements TbBuyerService {
	@Autowired
	private TbBuyerMapper buyerMapper;

	public TbBuyer login(String username) {
		return buyerMapper.login(username);
	}

	public int getCount(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return buyerMapper.getCount(map);
	}

	public boolean insertBuyer(TbBuyer buyer) {
		// TODO Auto-generated method stub
		return buyerMapper.insert(buyer) > 0;
	}

	public boolean updateBuyer(TbBuyer buyer) {
		// TODO Auto-generated method stub
		return buyerMapper.updateBuyer(buyer) > 0;
	}

	public boolean deleteBuyer(String[] bids) {
		// TODO Auto-generated method stub
		return buyerMapper.deleteBuyer(bids) > 0;
	}

	public List<TbBuyer> listPage(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return buyerMapper.listPage(map);
	}

}
